﻿#ifndef DIALOG_H
#define DIALOG_H

#include <QDialog>
#include "PictureBox.h"
#include <opencv2/core.hpp>
#include "shape_based_matching/ShapeBasedMatching.h"
#include "shape_based_matching/SimpleShapeBasedMatching.h"
#include "shape_based_matching/ScaledShapeBasedMatching.h"
#include "shape_based_matching/RotatedShapeBasedMatching.h"
QT_BEGIN_NAMESPACE
namespace Ui { class Dialog; }
QT_END_NAMESPACE

class Dialog : public QDialog
{
    Q_OBJECT

public:
    Dialog(QWidget *parent = nullptr);
    ~Dialog();

private slots:
    void on_pushButtonOpenTemplate_clicked();

    void on_pushButtonTrainModel_clicked();

    void on_pushButtonOpenImage_clicked();

    void on_pushButtonRunMatch_clicked();

    void on_pushButtonShowFeaturePts_clicked();

private:

    //void on_pushButtonTrainModel_clicked2();

    Ui::Dialog *ui;

    PictureBox * box1;
    PictureBox * box2;

    int num_feature;

    QImage m_templateImage;
    QImage m_testImage;
    QImage m_featureImage;
    cv::Mat templateImg; //模板图
    cv::Mat testImg; //测试图
    cv::Mat featureImg; //特征点图
    cv::Mat resultImg; //结果图

    Qly::RotatedShapeBasedMatching sbMatch;
};
#endif // DIALOG_H
